# vim: ts=4:sw=4:syntax=perl

sub mm_form_add_portal_populate {
my ($portal_title,$portal_filename,$portal_users,$portal_template,$portal_owners,$portal_voters,$portal_concur)=@_;

	$portal_title="" if $portal_title eq "?portal_title - not defined?";
	$portal_filename="" if $portal_filename eq "?portal_filename - not defined?";
	$portal_users="" if $portal_users eq "?portal_users - not defined?";
	$portal_owners="" if $portal_owners eq "?portal_owners - not defined?";
	$portal_voters="" if $portal_voters eq "?portal_voters - not defined?";
	$portal_concur="" if $portal_concur eq "?portal_concur - not defined?";
	$portal_template="" if $portal_template eq "?portal_template - not defined?";
	$portal_title=hex_to_string($portal_title);
	$portal_filename=hex_to_string($portal_filename);
	$portal_users=hex_to_string($portal_users);
	$portal_owners=hex_to_string($portal_owners);
	$portal_voters=hex_to_string($portal_voters);
	$portal_concur=hex_to_string($portal_concur);
	$portal_template=hex_to_string($portal_template);

return "
    <tr class=gri_headerrow>
      <td class=gri_cell colspan=3>New Portal Details</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell>&nbsp;</td>
      <td class=gri_cell>&nbsp;</td>
      <td class=gri_cell>&nbsp;</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell align=left><font class=stdtextlarge>Title:</font></td>
      <td class=gri_cell>&nbsp;&nbsp;&nbsp;</td>
      <td class=gri_cell>
        <INPUT TYPE=\"text\" VALUE=\"$portal_title\" NAME=\"title\" SIZE=\"60\" MAXLENGTH=\"40\" TITLE=\"The name of the portal as shown in the front Intranet page.\">
      </td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell colspan=3>&nbsp;</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell><font class=stdtextlarge>Filename:</font></td>
      <td class=gri_cell>&nbsp;&nbsp;&nbsp;</td>
      <td class=gri_cell>
        <INPUT TYPE=\"text\" VALUE=\"$portal_filename\" NAME=\"filename\" SIZE=\"60\" MAXLENGTH=\"40\" TITLE=\"The filename to store the portals details in. It should end in '.xml' and ideally not contain spaces.\">
      </td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell colspan=3>&nbsp;</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell><font class=label><font class=stdtextlarge>Users:</font></td>
      <td class=gri_cell>&nbsp;&nbsp;&nbsp;</td>
      <td class=gri_cell>
        <INPUT TYPE=\"text\" VALUE=\"$portal_users\" NAME=\"users\" SIZE=\"60\" MAXLENGTH=\"40\" TITLE=\"A comma-separated list of users to allow access to portal. Can be altered later and left blank to make the portal public.\">
      </td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell colspan=3>&nbsp;</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell><font class=label><font class=stdtextlarge>Owners:</font></td>
      <td class=gri_cell>&nbsp;&nbsp;&nbsp;</td>
      <td class=gri_cell>
        <INPUT TYPE=\"text\" VALUE=\"$portal_owners\" NAME=\"owners\" SIZE=\"60\" MAXLENGTH=\"250\" TITLE=\"A comma-separated list of users that can make changes to the portal. Can be left blank to allow only users with admin roles make changes.\">
      </td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell colspan=3>&nbsp;</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell><font class=label><font class=stdtextlarge>Voters:</font></td>
      <td class=gri_cell>&nbsp;&nbsp;&nbsp;</td>
      <td class=gri_cell>
        <INPUT TYPE=\"text\" VALUE=\"$portal_voters\" NAME=\"voters\" SIZE=\"60\" MAXLENGTH=\"250\" TITLE=\"A comma-separated list of users that have voting rights on user requests to access this portal. Can be left blank to allow only users with admin roles make changes.\">
      </td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell colspan=3>&nbsp;</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell><font class=label><font class=stdtextlarge>Concur Count:</font></td>
      <td class=gri_cell>&nbsp;&nbsp;&nbsp;</td>
      <td class=gri_cell>
        <INPUT TYPE=\"text\" VALUE=\"$portal_concur\" NAME=\"concur\" SIZE=\"60\" MAXLENGTH=\"250\" TITLE=\"The number of voters that must agree for access to be granted for a particular user request. Can be left blank to allow only users with admin roles make changes.\">
      </td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell colspan=3>&nbsp;</td>
    </tr>
    <tr class=gri_row>
      <td class=gri_cell><font class=label><font class=stdtextlarge>Template:</font></td>
      <td class=gri_cell>&nbsp;&nbsp;&nbsp;</td>
      <td class=gri_cell>
        <INPUT TYPE=\"text\" VALUE=\"$portal_template\" NAME=\"template\" SIZE=\"60\" MAXLENGTH=\"80\" TITLE=\"The name of a file containing information to customise the look of the portal.\">
      </td>
    </tr>\n";
}

1;

